from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static


urlpatterns = [
    path(r'admin/', admin.site.urls),
    path(r'api/account/', include('account.urls')),
    path(r'api/connection/', include('connection.urls')),
    path(r'api/datacenter/', include('datacenter.urls')),
    path(r'api/fs/', include('fs.urls')),
    path(r'api/task/', include('task.urls')),
    path(r'api/log/', include('log.urls')),
    path(r'api/system/', include('system.urls')),
    path(r'api/plugin/', include('plugin.urls')),

    path(r'openapi/', include('openapi.urls')),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
